package router

import (
	"github.com/gin-gonic/gin"
	v1 "guns-go/controller/v1"
)

func InitSysRoleRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
	RoleRouter := Router.Group("sysRole")
	{
		RoleRouter.GET("page", v1.RolePage)
		RoleRouter.POST("add", v1.RoleAdd)
		RoleRouter.POST("edit", v1.RoleEdit)
		RoleRouter.POST("delete", v1.RoleDelete)
		RoleRouter.POST("grantMenu", v1.RoleGrantMenu)
		RoleRouter.POST("grantData", v1.RoleGrantData)
		RoleRouter.GET("ownMenu", v1.RoleOwnMenu)
		RoleRouter.GET("ownData", v1.RoleOwnData)
	}
	return RoleRouter
}
